

// 赛事列列表
import {getArticleDetail} from "~/api/news";

export function getCompetitionLists(params?: Record<string, any>) {
    return $request.get({ url: '/competition/lists', params })
}

// 赛事列列表
export function getCompetitionDetail(params?: Record<string, any>) {
    return $request.get({ url: '/competition/detail', params })
}

// 赛事报名
export function postCompetitionApply(params?: Record<string, any>) {
    return $request.post({ url: '/competition/apply', params })
}

// 赛事列列表
export function getCompetitionApplyLists(params?: Record<string, any>) {
    return $request.get({ url: '/competition/apply/lists', params })
}

/**
 * @description 取消收藏
 * @param { number } id
 * @return { Promise }
 */
export function cancelCompetitionApply(params?: Record<string, any>) {
    return $request.post({ url: '/competition/apply/cancel', params })
}

// 赛事列列表
export function getCompetitionApplyInvite(code?: Record<string, any>) {
    return $request.get({ url: `/competition/apply/invite/${code}` })
}


export function acceptCompetitionApply(params?: Record<string, any>) {
    return $request.post({ url: '/competition/apply/accept', params })
}

// 赛事列列表
export function getCompetitionApplyShow(params?: Record<string, any>) {
    return $request.get({ url: '/competition/apply/show', params })
}

// 赛事列详情
export function competitionSession(params: Record<string, any>) {
    return $request.get({ url: '/competition/session', params })
}

export function competionPlay(params: Record<string, any>) {
    console.log(params)
    return $request.get({ url: '/competition/play', params })
}
export function competionPlayDetail(params: Record<string, any>) {
    return $request.get({ url: '/competition/play/detail', params })
}

export function getCompetionMessageLists(params?: Record<string, any>) {
    return $request.get({ url: '/competition/message/lists', params })
}
// 社团社员认证
export function postCompetionAddMessage(params?: Record<string, any>) {
    return $request.post({ url: '/competition/message', params })
}

export function getCompetionMessageLike(params?: Record<string, any>) {
    return $request.get({ url: `/competition/message/like/${params.id}` })
}

export function getCompetionMessageDisLike(params?: Record<string, any>) {
    return $request.get({ url: `/competition/message/dislike/${params.id}` })
}

export function competitionScheduleLists(params?: Record<string, any>) {
    return $request.get({ url: '/competition/schedule/lists', params })
}

export function competitionScoreLists(params?: Record<string, any>) {
    return $request.get({ url: '/competition/score/lists', params })
}

export function competitionScoreAdd(params?: Record<string, any>){
    return $request.post({url: '/competition/score/add',params})
}
